
<include file="Public/ace_header" />
<div class="row">
    <div class="col-xs-12">
        <div class="row hidden-480 search">
          <form id="search-form">
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[location]" id="location" value="{$_GET[searchMap][location]}" placeholder="区域"/>
                </div>
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[Start]" id="Start" value="{$_GET[searchMap][Start]}" placeholder="开始时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="" onChange="created_atStartChange()"/>
                </div>
                <div class="col-md-3 search-input-div">
                    <input type="text" class="col-md-12 search-input" name="searchMap[End]" id="End" value="{$_GET[searchMap][End]}" placeholder="结束时间" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" readonly="" onChange="created_atEndChange()"/>
                </div>
                <div class="col-md-3 col-md-offset-9 center search-input-div">
                    <button type="submit" class="btn btn-success btn-xs">查询</button>
                    <button class="btn btn-warning btn-xs" type="button" href="#" onclick="clearFind()">清空</button>
                    <button class="btn btn-danger btn-xs" type="button" href="javascript:void(0);" id="delall">删除</button>
                </div>
            </form>
        </div>
        <div class="table-responsive">
            <table class="table table-striped table-bordered table-hover">
                <thead>
                    <tr>
                        <th class="center">
                            <label>
                                <input type="checkbox" class="ace" id="checkall"/>
                                <span class="lbl"></span>
                            </label>
                        </th>
                    <th class="center">ID</th>
                    <th class="center">商家名称</th>
                    <th class="center">付款人姓名</th>
                    <th class="center">支付时间</th>
                    <th class="center">金额</th>
                    <th class="center">保险</th>
                    <!-- <th class="center">合同</th> -->
                    <th class="center">是否完成</th>
                    <th class="center">投诉</th>

                    <!--<th class="center">购买用户</th>
                    <th class="center">订单名称</th>
                    <th class="center">开始日期</th>
                    <th class="center">结束日期</th>
                    <th class="center">价格</th>
                    <th class="center">总价</th>
                    <th class="center">用户姓名</th>
                    <th class="center">用户电话</th>
                    <th class="center">用户性别</th>
                    <th class="center">订单状态</th>
                    <th class="center">保险</th>
                        <th class="center">操作</th>-->
                    </tr>
                </thead>
                <tbody>
                    <volist name="list" id="vo">
                    <tr>
                        <td class="center">
                            <label>
                                <input type="checkbox" class="ace" name="chkid" value="{$vo['id']}"/>
                                <span class="lbl"></span>
                            </label>
                        </td>
                        <td class="center">{$vo[id]}</td>
                          <php>
                            $tmp = D('customized_travel')->find($vo[order_id]);
                          
                          </php>
                        <td class="center">
                          <php> $tmp = D("customized_travel")->find($vo["order_id"]);
                            echo D("user_club")->where(['principal_id' => $tmp['club_user_id']])->find()['club_name'];
                          </php>
                        </td>
                        <td class="center">
                        <!-- <php> echo D("User")->find($tmp["user_id"])["name"];    echo D("User")->find($tmp["user_id"])["id_number"];</php> -->
                        {$vo.name}
                        </td>
                        <td class="center"><if condition="$tmp[create_time] neq 0">{$tmp[create_time]|default=''|date="Y-m-d H:i:s",###}</if></td>
                        <td class="center">{$vo[amount]}</td>
                        <td class="center">{$tmp[insurance_price]}</td>
                      <!--   <td class="center">
                          <php>
                            echo "customized_travel_".$tmp["id"]."_".$tmp["create_time"];
                          </php>
                          
                        </td> -->

                        <td class="center">{$vo[state]}</td>
                        <td class="center">
                          <php>
                            $complaint = D('complaint')->where(['order_id' => $vo[order_id], 'order_type' => 'CustomizedTravel'])->select();
                            foreach ($complaint as $val) {
                            echo $val['state'].'-----'.$val['content'].'</br>';
                            } 
                          </php>
                          <a href="{:U('Admin/Complaint/list')}?searchMap['order_id']={$vo[order_id]}&searchMap['order_type']=CustomizedTravel" >投诉详情</a>
                        </td>

                        <!--<td class="center"><php> echo D("User")->find($vo["user_id"])["name"];</php></td>
                        <td class="center">{$vo[name]}</td>
                        <td class="center"><if condition="$vo[start_time] neq 0">{$vo[start_time]|default=''|date="Y-m-d",###}</if></td>
                        <td class="center"><if condition="$vo[end_time] neq 0">{$vo[end_time]|default=''|date="Y-m-d",###}</if></td>
                        <td class="center">{$vo[price]}</td>
                        <td class="center">{$vo[user_name]}</td>
                        <td class="center">{$vo[user_phone]}</td>
                        <td class="center">{$vo[user_gender]}</td>
                        <td >{$vo[state]}</td><td class="center"><a href="__MODULE__/InsuranceOrder/list?searchMap[order_type]=customized_guider&searchMap[order_id]={$vo['id']}">点击查看</a></td>
                            <td class="center">
                                <div class="visible-md visible-lg hidden-sm hidden-xs btn-group">
                                    <a href="{:U(detail, ['id'=>$vo['id']])}">
                                        <button class="btn btn-xs btn-warning" style="border: 1px;">
                                            <i class="icon-search" style="margin-right: 0px;"></i>
                                        </button>
                                    </a>
                                    <a href="{:U(update, ['id'=>$vo['id']])}">
                                        <button class="btn btn-xs btn-info" style="border: 1px;">
                                            <i class="icon-edit" style="margin-right: 0px;"></i>
                                        </button>
                                    </a>
                                    <a class="delete-btn" id="{$vo['id']}" >
                                        <button class="btn btn-xs btn-danger" style="border: 1px;">
                                            <i class="icon-trash"></i>
                                        </button>
                                    </a>
                                </div>
                                <div class="visible-xs visible-sm hidden-md hidden-lg">
                                    <div class="inline position-relative">
                                        <button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
                                            <i class="icon-cog icon-only bigger-110"></i>
                                        </button>
                                        <ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
                                            <li>
                                                <a href="{:U(detail, ['id'=>$vo['id']])}" class="tooltip-success" data-rel="tooltip" title="Edit">
                                                    <span class="yellow">
                                                        <i class="icon-search bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="{:U(update, ['id'=>$vo['id']])}" class="tooltip-success" data-rel="tooltip" title="Edit">
                                                    <span class="green">
                                                        <i class="icon-edit bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                            <li>
                                                <a class="delete-btn" id="{$vo['id']}">
                                                    <span class="red">
                                                        <i class="icon-trash bigger-120"></i>
                                                    </span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </td>-->
                        </tr>
                    </volist>
                </tbody>
            </table>
            {$page}
        </div><!-- /.table-responsive -->
    </div><!-- /span -->
</div><!-- /row -->
<include file="Public/ace_footer" />
